package de.sabram.upb.specs.eee_tools;

import org.eclipse.jface.preference.DirectoryFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.RadioGroupFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class EliRuntimePreferencePage extends FieldEditorPreferencePage implements
		IWorkbenchPreferencePage {
	@Override
	public void init(IWorkbench workbench) {
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
	    setTitle("Eli Runtime Preferences");
	    setDescription("This preferences are used to define the Eli Runtime.");
	}

	@Override
	protected void createFieldEditors() {
		addField(new DirectoryFieldEditor("ELI_PATH", "&Path to Eli:",
		        getFieldEditorParent()));
		    addField(new RadioGroupFieldEditor("CHOICE",
		        "Define the desired LogLevel", 2,
		        new String[][] { 
		    		{ "LogLevel = 1", "LogLevel=1" },
		            { "LogLevel = 2", "LogLevel=2" },
		            { "LogLevel = 3", "LogLevel=3" },
		            { "LogLevel = 4", "LogLevel=4" } 
		            }, getFieldEditorParent()));
	}

}
